package cn.com.nes.site.controller.crm.saleorder.vo;

import cn.com.nes.site.entity.vo.BaseVO;
import cn.com.nes.site.service.crm.customer.bo.CustomerBO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@ApiModel(value = "客户保存入参模型")
@Data
public class SaveCrmCustomerVo extends BaseVO {
    // ------- 客户信息 ------
    @ApiModelProperty(value = "用户主键ID，用于区分新增、编辑")
    private String uuid;

    @ApiModelProperty(value = "客户姓名", required = true)
    @NotNull(message = "客户姓名")
    private String customerName;

    @ApiModelProperty(value = "联系人")
    private String contact;

    @ApiModelProperty(value = "手机号", required = true)
    @NotNull(message = "手机号")
    private String phone;

    @ApiModelProperty(value = "客户性质", required = true)
    @NotNull(message = "客户性质")
    private String customerNature;

    @ApiModelProperty(value = "业务类型")
    private String businessType;

    @ApiModelProperty(value = "客户级别")
    private String customerLevel;

    @ApiModelProperty(value = "行政区划代码")
    private String xzqhdm;

    @ApiModelProperty(value = "客户地址")
    private String address;

    @ApiModelProperty(value = "经度")
    private BigDecimal longitude;

    @ApiModelProperty(value = "纬度")
    private BigDecimal latitude;

    @ApiModelProperty(value = "备注")
    private String memo;

    // -----------企业信息---------
    @ApiModelProperty(value = "公司性质")
    private String natureOfCompany;

    @ApiModelProperty(value = "公司法人")
    private String legalPerson;

    @ApiModelProperty(value = "成立时间")
    private Date establishmentTime;

    @ApiModelProperty(value = "统一信用代码")
    private String unifiedcreditCode;

    @ApiModelProperty(value = "注册资本")
    private BigDecimal registeredCapital;

    @ApiModelProperty(value = "业务范围")
    private String scopeOfBusiness;

    @ApiModelProperty(value = "公司网址")
    private String website;

    @ApiModelProperty(value = "经销商唯一编码")
    private String distributorCode;

    @ApiModelProperty(value = "所属客户")
    private String distributorType;

    @ApiModelProperty(value = "渠道负责人")
    private String channelPerson;

    @ApiModelProperty(value = "拓展字段")
    private String jsonData;

    @ApiModelProperty(value = "模版ID")
    private String templateId;

    @ApiModelProperty(value = "客户来源 值域对应t_param表 param_type=13")
    private String customerSource;

    @ApiModelProperty(value = "保存类型：0-全部客户，1-我的客户")
    private Integer saveType;

    @ApiModelProperty(value = "上级客户id")
    private String superCustomerId;

    @ApiModelProperty(value = "计划年份")
    private String planYear;

    @ApiModelProperty(value = "身份证号码")
    private String idCardNumber;

    @ApiModelProperty(value = "客户编号")
    private String customerCode;

    @ApiModelProperty(value = "用能主体性质编码")
    private String energyUsePropertyCode;

    @ApiModelProperty(value = "是否本村户籍")
    private Boolean isVillagers;

    @ApiModelProperty(value = "公司id")
    private String companyId;

    public CustomerBO convertToBo() {
        CustomerBO customerBO = new CustomerBO();
        BeanUtils.copyProperties(this, customerBO);
        return customerBO;
    }

}
